
#include "S_2_AirConditioner_doChange.h"
#include "property_decoder.h"
#include "spec.h"


void P_2_1_On_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif	
	
    if (send_property_changed(2, 1, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_2_Mode_doChange(int newValue)
{
	property_value_t thiz;
	memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(2, 2, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_3_Fault_doChange(const char * newValue)
{
	property_value_t thiz;
	memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_string(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_STRING;
	strncpy(thiz.data.string.value, newValue, strlen(newValue));
	thiz.data.string.length = strlen(newValue);
#endif	    
	
    if (send_property_changed(2, 3, &thiz) != MIIO_OK)
    {
       LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_4_TargetTemperature_doChange(float newValue)
{
	property_value_t thiz;
	memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_float(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_FLOAT;
	thiz.data.number.value.floatValue = newValue;
#endif		
	if (send_property_changed(2, 4, &thiz) != MIIO_OK)
    {
       LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_7_Eco_doChange(bool newValue)
{
	property_value_t thiz;
	memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif	    
	
    if (send_property_changed(2, 7, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_9_Heater_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif	    
	
    if (send_property_changed(2, 9, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_10_Dryer_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif	    
	
    if (send_property_changed(2, 10, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_11_SleepMode_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif	    
	
    if (send_property_changed(2, 11, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_14_TargetHumidity_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(2, 14, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_17_PurifySwitch_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(2, 17, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_18_ListSoftWind_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(2, 18, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_19_FavoriteOn_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
 #if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif	   
	
    if (send_property_changed(2, 19, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_20_FavoriteType_doChange(int newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
#if 	PROPERTY_TYPE
	property_value_new_integer(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_NUMBER;
	thiz.data.number.type = DATA_NUMBER_INTEGER;
	thiz.data.number.value.integerValue = newValue;
#endif		
	
	if (send_property_changed(2, 20, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}

void P_2_28_PeoPleApproachSoftWind_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
 #if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif	   
	
    if (send_property_changed(2, 28, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}


void P_2_34_FormaldehydeRemoval_doChange(bool newValue)
{
	property_value_t thiz;
    memset(&thiz,0,sizeof(thiz));
 #if 	PROPERTY_TYPE
	property_value_new_boolean(&thiz,newValue);
#else	
    thiz.format = PROPERTY_FORMAT_BOOLEAN;
    thiz.data.boolean.value = newValue;
#endif	   
	
    if (send_property_changed(2, 34, &thiz) != MIIO_OK)
    {
        LOG_INFO("%s:send_property_changed failed!\n",__func__);
    }
}


